package day04;

import java.util.Arrays;
import java.util.Scanner;

//从键盘上输入若干个整数，将其排序后，去掉重复的数再输出
public class P01Demo {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int[] a = new int[1];
        int j = 0;
        while (cin.hasNext()) {
            if (j == a.length) {//double space
                int[] b = new int[a.length * 2];
                for (int i = 0; i < a.length; i++) {
                    b[i] = a[i];
                }
                a = b;
            }


            a[j++] = cin.nextInt();
        }
        Arrays.sort(a,0,j);
        System.out.print(a[0]);
        for (int i = 1; i < j; i++) {
            if (a[i] == a[i - 1]) continue;
            System.out.print(" " + a[i]);
        }
    }
}
